The present invention relates to displaying text on a computer screen. In particular, the present invention relates to displaying text within a region on a computer screen.
To allow different areas of a computer screen to have different appearances, the prior art has developed a coding construct known as a region, which is defined as an area located within the perimeter of a closed shape or some combination of closed shapes. Often, a region is defined as a combination of rectangles, ellipses and polygons.
To write text within a region, a series of rectangles are generated within the region. In the prior art, these rectangles are generated using a technique associated with rendering a region to a screen. Under this technique, the region is “scanned” to produce a set of vertically stacked rectangles that approximate the region. The height of each of these rectangles is fixed and determines the granularity of the approximation. In general, shorter rectangles provide a more accurate representation of the region but also require more data.
Under text layout systems of the prior art, this scanning technique is used to identify a series of rectangles in which text may be written. Since the rectangles must accommodate the text, the height of the rectangles is set equal to the height of the text that is to be written in the region.
This technique can cause problems if the region is later rendered using shorter rectangles than the rectangles used to layout the text. In particular, the higher definition rectangles can cause a perimeter of the region to intersect some of the text that is supposed to be contained within the region. To avoid this problem, the region's rendering rectangles can be made the same height as the text rectangles, but this may diminish the appearance of the region's perimeter.
In addition, since the scanning technique only builds horizontal rectangles, the prior art has been unable to achieve sophisticated text layouts. In particular, the prior art does not provide a way to skew or rotate text within a region.
Prior art text layout systems have also been limited to placing text in a single region. Under the prior art there is no means for wrapping a string of text across multiple regions with a single function call.